package com.zzx.boot.entity.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @author tan
 * @version 1.0
 * @date 2023/7/9 22:32
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BindPhoneDto {

    @NotNull(message = "手机号不能为空")
    @Pattern(regexp="^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\\d{8}$",message = "手机号格式不正确")
    private String phone;
    @NotNull(message = "验证码不能为空")
    @Length(min = 4,max = 4,message = "验证码长度是4")
    private String code;
    @NotNull(message = "第三方id不能为空")
    private Long bindId;

}
